from bs4 import BeautifulSoup
import requests

content = requests.get("https://books.toscrape.com").text
soup = BeautifulSoup(content,"html.parser")
all_prices = soup.find_all("p",attrs={"class":"price_color"})
for price in all_prices:
    print(price.string)

all_title = soup.find_all("h3")
for title in all_title:
    line = title.find("a")
    print(line.string)
